/**
 * 首页api
 */
import request from '@/utils/request'
import { jdyadmin } from '@/settings'

/**
 * ---------------------------------------------------
 * ----------------------审批规则---------------------
 * ---------------------------------------------------
 */
// 查询审批规则
export function getShenpi(data){
	return request({
		url: `${jdyadmin}/jdyRule/seleteJdyRule`,
		method: 'post',
		data
	})
}

// 新增审批规则
export function addShenpi(data){
	return request({
		url: `${jdyadmin}/jdyRule/addJdySupplier`,
		method: 'post',
		data
	})
}

// 编辑审批规则
export function updateShenpi(data){
	return request({
		url: `${jdyadmin}/jdyRule/updateJdyRule`,
		method: 'post',
		data
	})
}

// 删除审批规则
export function deleteShenpi(id){
	return request({
		url: `${jdyadmin}/jdyRule/deleteJdyJdyRule/${id}`,
		method: 'delete'
	})
}

/**
 * ---------------------------------------------------
 * ----------------------领导审批---------------------
 * ---------------------------------------------------
 */

// 查询领导审批
export function getLingdao(data){
	return request({
		url: `${jdyadmin}/jdyFlow/seleteflowService`,
		method: 'post',
		data
	})
}

// 新增领导审批
export function addLingdao(data){
	return request({
		url: `${jdyadmin}/jdyFlow/addkeyPointPracticableService`,
		method: 'post',
		data
	})
}

// 编辑领导审批
export function updateLingdao(data){
	return request({
		url: `${jdyadmin}/jdyFlow/updatekeyPointPracticableService`,
		method: 'post',
		data
	})
}

// 删除领导审批
export function deleteLingdao(id){
	return request({
		url: `${jdyadmin}/jdyFlow/deletekeyPointPracticableService/${id}`,
		method: 'delete'
	})
}


// 审批操作(所有人操作都是调用这个接口)
export function hanlderShenpi(data){
	return request({
		url: `${jdyadmin}/jdyPurchase/updatejdyCommodityFlow`,
		method: 'post',
		data
	})
}

// 首页分类使用管理1
export function selectClassifyUse1(){
	return request({
		url: `${jdyadmin}/starchOrganizationPut/seletFenleiShiyong`,
		method: 'get',
	})
}

// 首页分类使用管理2
export function selectClassifyUse2(){
	return request({
		url: `${jdyadmin}/starchOrganizationPut/seletShouyeDetails`,
		method: 'get'
	})
}

// 查询盘点管理
export function selectPandian(data){
	return request({
		url: `${jdyadmin}/starchOrganizationPut/seletStarchManageCheck`,
		method: 'post',
		data
	})
}

// 查询维保到期
export function selectWeibaodaoqi(data){
	return request({
		url: `${jdyadmin}/starchOrganizationPut/seletWeibaodaoqi`,
		method: 'post',
		data
	})
}

// 查询资产到期
export function selectZichandaoqi(data){
	return request({
		url: `${jdyadmin}/starchOrganizationPut/seletZichandaoqi`,
		method: 'post',
		data
	})
}
